/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author WinKiQue58
 */
@Embeddable
public class ItemCampaignPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ITEM_CAMPAIGN")
    private BigInteger idItemCampaign;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CAMPAIGN")
    private BigInteger idCampaign;

    public ItemCampaignPK() {
    }

    public ItemCampaignPK(BigInteger idItemCampaign, BigInteger idCampaign) {
        this.idItemCampaign = idItemCampaign;
        this.idCampaign = idCampaign;
    }

    public BigInteger getIdItemCampaign() {
        return idItemCampaign;
    }

    public void setIdItemCampaign(BigInteger idItemCampaign) {
        this.idItemCampaign = idItemCampaign;
    }

    public BigInteger getIdCampaign() {
        return idCampaign;
    }

    public void setIdCampaign(BigInteger idCampaign) {
        this.idCampaign = idCampaign;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idItemCampaign != null ? idItemCampaign.hashCode() : 0);
        hash += (idCampaign != null ? idCampaign.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItemCampaignPK)) {
            return false;
        }
        ItemCampaignPK other = (ItemCampaignPK) object;
        if ((this.idItemCampaign == null && other.idItemCampaign != null) || (this.idItemCampaign != null && !this.idItemCampaign.equals(other.idItemCampaign))) {
            return false;
        }
        if ((this.idCampaign == null && other.idCampaign != null) || (this.idCampaign != null && !this.idCampaign.equals(other.idCampaign))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.ItemCampaignPK[ idItemCampaign=" + idItemCampaign + ", idCampaign=" + idCampaign + " ]";
    }
    
}
